<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员管理-有点</title>
<link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/resource/css.css">
<link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/resource/pageGroup.css">

	<script src="<?php echo Url::base();?>jquery.min.js" type="text/javascript"></script>
	<script src="<?php echo Url::base(); ?>jquery.uploadify.min.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>uploadify.css">


	<link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>/themes/icon.css">
	<script type="text/javascript" src="<?php echo Url::base(); ?>/jquery.easyui.min.js"></script>
<!-- <script type="text/javascript" src="js/page.js" ></script> -->
</head>
<body>
<form method="post" action="<?php echo Url::base(); ?>index.php/setm/update?type=<?php echo $action;?>">
	设置第一个产品信息<br>

	
	<?php foreach($label  as $key=>$val){?>
	<input type="checkbox" <?php if(in_array($val['id'], explode(",",$labelPorduct[0]['content']))){ echo "checked=che";} ?> name="label[]" value="<?php echo $val['id'];?>"><?php echo $val['name'];?>
	<?php }?>
		<?php

		foreach($labelPorduct as $key=>$value){?>


			<script>

				$(function(){
					$('#file_upload10').uploadify({

						'formData'     : {
						},
						'swf'      : '<?php echo Url::base(); ?>uploadify.swf',
						'uploader' : '<?php echo Url::base(); ?>index.php/productm/upload',
						'onUploadSuccess':function(file,data,response){
							if(data== 'false'){
								alert("图片格式不正确请检查")
							}else{
								alert("上传成功")
								$("input[attr='file_upload10']").val(data)

							}}

					});
				})
			</script>

			<input type="hidden"  attr="file_upload10" value="<?php echo $value['img'];?>" name="pic"><br>
			<?php
				if($value['img']!=""){
					echo '<img src="'. Url::base() .'/uploads/'.$value['img'].'" height="100" width="100" >';

				}

			?>
			<input id="file_upload10" name="name" type="file" multiple="true"><br>
			<input  name="fristProduct[]" value="<?php echo $value['productId'];?>" id="cc" class="easyui-combogrid" style="width:250px" data-options="
			panelWidth: 500,
			idField: 'id',
			textField: 'title',
			rownumbers:true,singleSelect:true,url:'<?php echo Url::base(); ?>index.php/productm/getListShelves',method:'get',pagination:true,

			method: 'get',
			columns: [[
				{field:'id',width:80,title:'主键'},
				{field:'productNumber',width:100,title:'编号'},
				{field:'replying',width:100,title:'回复数'},
				{field:'title',width:180,title:'评价分数'},

			]],
			fitColumns: true
		">
<br>


<?php
		}
	?>

	<?php

		foreach($data as $key=>$value){?>


			<script>

				$(function(){
					$('#file_upload<?php echo $key;?>').uploadify({

						'formData'     : {
						},
						'swf'      : '<?php echo Url::base(); ?>uploadify.swf',
						'uploader' : '<?php echo Url::base(); ?>index.php/productm/upload',
						'onUploadSuccess':function(file,data,response){
							if(data== 'false'){
								alert("图片格式不正确请检查")
							}else{
								alert("上传成功")
								$("input[attr='file_upload<?php echo $key;?>']").val(data)

							}}

					});
				})
			</script>

			<input type="hidden"  attr="file_upload<?php echo $key;?>" value="<?php echo $value['img'];?>" name="mainpic[]"><br>
			<?php
				if($value['img']!=""){
					echo '<img src="'. Url::base() .'/uploads/'.$value['img'].'" height="100" width="100" >';

				}

			?>
			<input id="file_upload<?php echo $key;?>" name="name" type="file" multiple="true"><br>
			顺序<input  name="sort[]"  value="<?php echo $value['sort'];?>" type="text" id="">
			<input  name="productId[]" value="<?php echo $value['productId'];?>" id="cc" class="easyui-combogrid" style="width:250px" data-options="
			panelWidth: 500,
			idField: 'id',
			textField: 'title',
			rownumbers:true,singleSelect:true,url:'<?php echo Url::base(); ?>index.php/productm/getListShelves',method:'get',pagination:true,

			method: 'get',
			columns: [[
				{field:'id',width:80,title:'主键'},
				{field:'productNumber',width:100,title:'编号'},
				{field:'replying',width:100,title:'回复数'},
				{field:'title',width:180,title:'评价分数'},

			]],
			fitColumns: true
		">
<br>


<?php
		}
	?>

<input type="submit">
	</form>
</body></html>